$color=array('orange','orange','cyan','blue','black','gray');
$newthreads=thread_find(array(), array('tid'=>-1),1,6) ;
$topthreads=thread_find(array('top'=>1), array('tid'=>-1),1,6) ;
$blogs=kv_get('di_blogs');
$newthread=thread_read($blogs['newImgId']);
$topthread=thread_read($blogs['topImgId']);
$newPost=post_read($newthread['firstpid']);
$topPost=post_read($topthread['firstpid']);
$newImg='plugin/di_blogs/overwrite/view/images/pic03.jpg';
$topImg='plugin/di_blogs/overwrite/view/images/pic03.jpg';
//if($newthread['images'] > 0)  $newImg=attach_find_by_pid($newthread['firstpid'])[1][0]['url'];
//if($topthread['images'] > 0)  $topImg=attach_find_by_pid($topthread['firstpid'])[1][0]['url'];



$tablepre = $db->tablepre;


//0文字 1图片 2图文 3下载
for($i=0;$i<4;$i++){

	$forumArr[$i]=forum_find(['cate'=>$i]);
	$j=0;
	foreach ($forumArr[$i] as $forums ) {

		if($i==0){
				$articles[$i][$j]=thread_find_by_fid($forums['fid'],1,6);
				$articles[$i][$j]=thread_find_by_fid($forums['fid'],1,6);
		}
		$articles[$i][$j]=thread_find_by_fid($forums['fid'],1,12);
		$j++;
	}
}



echo '<pre>';
//var_dump(thread_read(42));
echo '</pre>';
